From 013e0c3d1130648a09afcbaa43f1784b5a97293a Mon Sep 17 00:00:00 2001 From: Sven Neumann Date: Tue, 15 Apr 2008 09:25:30 +0000 Subject: [PATCH] extensions/util.h removed trailing whitespace. 2008-04-15 Sven Neumann * extensions/util.h * babl/*.[ch]: removed trailing whitespace. svn path=/trunk/; revision=307 --- ChangeLog | 5 ++++ babl/babl-classes.h | 4 +-- babl/babl-component.c | 2 +- babl/babl-db.c | 12 ++++---- babl/babl-db.h | 10 +++---- babl/babl-fish-path.c | 56 +++++++++++++++++++------------------- babl/babl-fish-reference.c | 2 +- babl/babl-fish-simple.c | 2 +- babl/babl-fish-stats.c | 4 +-- babl/babl-fish.c | 40 +++++++++++++-------------- babl/babl-format.c | 10 +++---- babl/babl-hash-table.c | 42 ++++++++++++++-------------- babl/babl-hash-table.h | 8 +++--- babl/babl-image.c | 2 +- babl/babl-internal.h | 4 +-- babl/babl-introspect.c | 2 +- babl/babl-list.c | 8 +++--- babl/babl-list.h | 2 +- babl/babl-model.c | 2 +- babl/babl-sanity.c | 2 +- babl/babl-type.c | 2 +- babl/babl.h | 20 +++++++------- babl/base/rgb-constants.h | 4 +-- babl/base/util.h | 2 +- extensions/util.h | 2 +- 25 files changed, 127 insertions(+), 122 deletions(-) diff --git a/ChangeLog b/ChangeLog index d159e70..6e9251e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2008-04-15 Sven Neumann + + * extensions/util.h + * babl/*.[ch]: removed trailing whitespace. + 2008-04-15 Sven Neumann * babl/babl-fish-path.c (init_path_instrumentation): this function diff --git a/babl/babl-classes.h b/babl/babl-classes.h index 25c5517..98b32b1 100644 --- a/babl/babl-classes.h +++ b/babl/babl-classes.h @@ -168,7 +168,7 @@ typedef struct int components; BablComponent **component; BablType **type; - void *image_template; /* image template for use with + void *image_template; /* image template for use with linear (non-planer) images */ BablSampling **sampling; @@ -177,7 +177,7 @@ typedef struct int planar; double loss; /*< average relative error when converting from and to RGBA double */ - int visited; /* for convenience in code while searching + int visited; /* for convenience in code while searching for conversion paths */ } BablFormat; diff --git a/babl/babl-component.c b/babl/babl-component.c index ef28dc6..8e873f7 100644 --- a/babl/babl-component.c +++ b/babl/babl-component.c @@ -110,7 +110,7 @@ babl_component_new (void *first_arg, va_end (varg); babl = babl_db_exist (db, id, first_arg); - if (babl) + if (babl) { /* There is an instance already registered by the required id/name, * returning the preexistent one instead. diff --git a/babl/babl-db.c b/babl/babl-db.c index 88f5182..0b10daf 100644 --- a/babl/babl-db.c +++ b/babl/babl-db.c @@ -16,7 +16,7 @@ * . */ -/* Reimplementation of database code using redundant hash tables +/* Reimplementation of database code using redundant hash tables * for faster searching by id/name and using list for fast item enumeration. * Copyright (C) 2008, Jan Heller */ @@ -26,7 +26,7 @@ #include #include "babl-internal.h" -static int +static int db_find_by_name (Babl *item, void *data) { if (!strcmp (item->instance.name, (char *) data)) @@ -34,7 +34,7 @@ db_find_by_name (Babl *item, void *data) return 0; } -static int +static int db_find_by_id (Babl *item, void *data) { if (item->instance.id == *((int *) data)) @@ -63,14 +63,14 @@ babl_db_init (void) db->id_hash = babl_hash_table_init (db_hash_by_id, db_find_by_id); db->babl_list = babl_list_init (); - return db; + return db; } void babl_db_destroy (BablDb *db) { babl_assert (db); - + babl_hash_table_destroy (db->name_hash); babl_hash_table_destroy (db->id_hash); babl_list_destroy (db->babl_list); @@ -120,7 +120,7 @@ babl_db_exist (BablDb *db, int id, const char *name) { - if (id) + if (id) return babl_hash_table_find (db->id_hash, babl_hash_by_int (db->id_hash, id), &id); return babl_hash_table_find (db->name_hash, babl_hash_by_str (db->name_hash, name), (void *) name); } diff --git a/babl/babl-db.h b/babl/babl-db.h index 1eb3700..d8c47c9 100644 --- a/babl/babl-db.h +++ b/babl/babl-db.h @@ -39,18 +39,18 @@ typedef struct _BablDb BablDb * babl_db_init (void); -void +void babl_db_destroy (BablDb *db); -void -babl_db_each (BablDb *db, +void +babl_db_each (BablDb *db, BablEachFunction each_fun, void *user_data); int babl_db_count (BablDb *db); -Babl * +Babl * babl_db_insert (BablDb *db, Babl *entry); @@ -59,7 +59,7 @@ babl_db_exist (BablDb *db, int id, const char *name); -Babl * +Babl * babl_db_exist_by_name (BablDb *db, const char *name); Babl * diff --git a/babl/babl-fish-path.c b/babl/babl-fish-path.c index 1c7c752..e4674f0 100644 --- a/babl/babl-fish-path.c +++ b/babl/babl-fish-path.c @@ -23,15 +23,15 @@ #define BABL_MAX_COST_VALUE 2000000 static void -init_path_instrumentation (Babl *fmt_source, +init_path_instrumentation (Babl *fmt_source, Babl *fmt_destination); static void destroy_path_instrumentation (void); static void -get_path_instrumentation (BablList *path, - double *path_cost, +get_path_instrumentation (BablList *path, + double *path_cost, double *ref_cost, double *path_error); @@ -43,7 +43,7 @@ process_conversion_path (BablList *path, static void get_conversion_path (Babl *current_format, - int current_length, + int current_length, int max_length); static double * @@ -99,13 +99,13 @@ static int max_path_length (void) /* The task of BablFishPath construction is to compute * the shortest path in a graph where formats are the vertices * and conversions are the edges. However, there is an additional - * constraint to the shortest path, that limits conversion error + * constraint to the shortest path, that limits conversion error * introduced by such a path to be less than BABL_ERROR. This - * prohibits usage of any reasonable shortest path construction + * prohibits usage of any reasonable shortest path construction * algorithm such as Dijkstra's algorithm. The shortest path is - * constructed by enumerating all available paths that are less - * than BABL_PATH_LENGTH long, computing their costs and - * conversion errors and backtracking. The backtracking is + * constructed by enumerating all available paths that are less + * than BABL_PATH_LENGTH long, computing their costs and + * conversion errors and backtracking. The backtracking is * implemented by recursive function get_conversion_path (). */ @@ -115,10 +115,10 @@ static BablList *current_path; static void get_conversion_path (Babl *current_format, - int current_length, + int current_length, int max_length) { - if (current_length > max_length) + if (current_length > max_length) { /* We have reached the maximum recursion * depth, let's bail out */ @@ -126,7 +126,7 @@ get_conversion_path (Babl *current_format, } else if ((current_length > 0) && (current_format == to_format)) { - /* We have found a candidate path, let's + /* We have found a candidate path, let's * see about it's properties */ double path_cost = 0.0; double ref_cost = 0.0; @@ -138,14 +138,14 @@ get_conversion_path (Babl *current_format, path_error *= (1.0 + babl_conversion_error ((BablConversion *) current_path->items[i])); } - if (path_error - 1.0 <= legal_error ()) /* check this before the next; + if (path_error - 1.0 <= legal_error ()) /* check this before the next; which does a more accurate measurement of the error */ { get_path_instrumentation (current_path, &path_cost, &ref_cost, &path_error); if ((path_cost < ref_cost) && /* do not use paths that took longer to compute than reference */ - (path_cost < fish_path->fish_path.cost) && + (path_cost < fish_path->fish_path.cost) && (path_error <= legal_error ())) { /* We have found the best path so far, @@ -156,9 +156,9 @@ get_conversion_path (Babl *current_format, } } } - else + else { - /* + /* * Bummer, we have to search deeper... */ BablList *list; int i; @@ -184,7 +184,7 @@ get_conversion_path (Babl *current_format, } /* Remove the current format from current path */ - current_format->format.visited = 0; + current_format->format.visited = 0; } } } @@ -211,7 +211,7 @@ babl_fish_path (const Babl *source, name = create_name (source, destination, 1); babl = babl_db_exist_by_name (babl_fish_db (), name); - if (babl) + if (babl) { /* There is an instance already registered by the required name, * returning the preexistent one instead. @@ -236,7 +236,7 @@ babl_fish_path (const Babl *source, babl->fish_path.loss = BABL_MAX_COST_VALUE; babl->fish_path.conversion_list = babl_list_init_with_size (BABL_HARD_MAX_PATH_LENGTH); - current_path = babl_list_init_with_size (BABL_HARD_MAX_PATH_LENGTH); + current_path = babl_list_init_with_size (BABL_HARD_MAX_PATH_LENGTH); fish_path = babl; to_format = (Babl *) destination; @@ -293,14 +293,14 @@ process_conversion_path (BablList *path, destination_buffer, n); } - else + else { void *aux1_buffer = babl_malloc (n * sizeof (double) * 5); void *aux2_buffer = NULL; void *swap_buffer = NULL; int i; - if (conversions > 2) + if (conversions > 2) { /* We'll need one more auxiliary buffer */ aux2_buffer = babl_malloc (n * sizeof (double) * 5); @@ -312,7 +312,7 @@ process_conversion_path (BablList *path, aux1_buffer, n); - /* Process, if any, conversions between the first and the last + /* Process, if any, conversions between the first and the last * conversion in the path, in a loop */ for (i = 1; i < conversions - 1; i++) { @@ -386,7 +386,7 @@ static double reference_cost; static int init_instrumentation_done = 0; static void -init_path_instrumentation (Babl *fmt_source, +init_path_instrumentation (Babl *fmt_source, Babl *fmt_destination) { long ticks_start = 0; @@ -435,7 +435,7 @@ init_path_instrumentation (Babl *fmt_source, source, ref_destination, NUM_TEST_PIXELS); ticks_end = babl_ticks (); reference_cost = babl_process_cost (ticks_start, ticks_end); - + /* transform the reference destination buffer to RGBA */ babl_process (fish_destination_to_rgba, ref_destination, ref_destination_rgba_double, NUM_TEST_PIXELS); @@ -444,7 +444,7 @@ init_path_instrumentation (Babl *fmt_source, static void destroy_path_instrumentation (void) { - if (init_instrumentation_done) + if (init_instrumentation_done) { babl_free (source); babl_free (destination); @@ -458,8 +458,8 @@ destroy_path_instrumentation (void) } static void -get_path_instrumentation (BablList *path, - double *path_cost, +get_path_instrumentation (BablList *path, + double *path_cost, double *ref_cost, double *path_error) { @@ -468,7 +468,7 @@ get_path_instrumentation (BablList *path, if (!init_instrumentation_done) { - /* this initialization can be done only once since the + /* this initialization can be done only once since the * source and destination formats do not change during * the search */ Babl *fmt_source = (Babl *) BABL (babl_list_get_first (path))->conversion.source; diff --git a/babl/babl-fish-reference.c b/babl/babl-fish-reference.c index c62a0a6..bee30f1 100644 --- a/babl/babl-fish-reference.c +++ b/babl/babl-fish-reference.c @@ -52,7 +52,7 @@ babl_fish_reference (const Babl *source, char *name = create_name (source, destination, 1); babl = babl_db_exist_by_name (babl_fish_db (), name); - if (babl) + if (babl) { /* There is an instance already registered by the required name, * returning the preexistent one instead. diff --git a/babl/babl-fish-simple.c b/babl/babl-fish-simple.c index 42fcd86..ecd6d0d 100644 --- a/babl/babl-fish-simple.c +++ b/babl/babl-fish-simple.c @@ -34,7 +34,7 @@ babl_fish_simple (BablConversion *conversion) name = create_name (conversion); babl = babl_db_exist_by_name (babl_fish_db (), name); - if (babl) + if (babl) { /* There is an instance already registered by the required name, * returning the preexistent one instead. diff --git a/babl/babl-fish-stats.c b/babl/babl-fish-stats.c index 64dd768..9f938c3 100644 --- a/babl/babl-fish-stats.c +++ b/babl/babl-fish-stats.c @@ -72,9 +72,9 @@ table_destination_each (Babl *babl, { fprintf (output_file, ""); fprintf (output_file, "%s", BABL (fish->fish_path.conversion_list->items[i])->instance.name); - fprintf (output_file, "%li", + fprintf (output_file, "%li", babl_conversion_cost (&BABL (fish->fish_path.conversion_list->items[i])->conversion)); - fprintf (output_file, "%e", + fprintf (output_file, "%e", babl_conversion_error (&BABL (fish->fish_path.conversion_list->items[i])->conversion)); fprintf (output_file, ""); } diff --git a/babl/babl-fish.c b/babl/babl-fish.c index a14fac2..db24fc0 100644 --- a/babl/babl-fish.c +++ b/babl/babl-fish.c @@ -38,11 +38,11 @@ match_conversion (Babl *conversion, void *inout); static int -find_fish_path (Babl *item, +find_fish_path (Babl *item, void *data); static int -find_memcpy_fish (Babl *item, +find_memcpy_fish (Babl *item, void *data); static int @@ -54,7 +54,7 @@ each_babl_fish_destroy (Babl *babl, static int -find_fish_path (Babl *item, +find_fish_path (Babl *item, void *data) { BablFindFish *ffish = (BablFindFish *) data; @@ -65,7 +65,7 @@ find_fish_path (Babl *item, { ffish->fish_ref = item; ffish->fishes++; - } + } else if (item->instance.class_type == BABL_FISH_PATH) { ffish->fish_path = item; @@ -84,7 +84,7 @@ find_fish_path (Babl *item, } static int -find_memcpy_fish (Babl *item, +find_memcpy_fish (Babl *item, void *data) { BablFindFish *ffish = (BablFindFish *) data; @@ -96,7 +96,7 @@ find_memcpy_fish (Babl *item, { ffish->fish_ref = item; return 1; - } + } } return 0; @@ -133,7 +133,7 @@ babl_fish_get_id (const Babl *source, const Babl *destination) { /* value of 'id' will be used as argument for hash function, - * substraction serves as simple combination of + * substraction serves as simple combination of * source/destination values. */ int id = (int) source - (int) destination; /* instances with id 0 won't be inserted into database */ @@ -188,11 +188,11 @@ babl_fish (const void *source, { int hashval; BablHashTable *id_htable; - BablFindFish ffish = {(Babl *) NULL, - (Babl *) NULL, - (Babl *) NULL, + BablFindFish ffish = {(Babl *) NULL, + (Babl *) NULL, + (Babl *) NULL, 0, - source_format, + source_format, destination_format}; id_htable = (babl_fish_db ())->id_hash; @@ -201,21 +201,21 @@ babl_fish (const void *source, if (source_format == destination_format) { /* In the case of equal source and destination formats - * we will search through the fish database for reference fish + * we will search through the fish database for reference fish * to handle the memcpy */ id_htable->find_func = find_memcpy_fish; babl_hash_table_find (id_htable, hashval, (void *) &ffish); } - else + else { /* In the case of different source and destination formats * we will search through the fish database for appropriate fish path * to handle the conversion. In the case that preexistent * fish path is found, we'll return it. In the case BABL_FISH * instance with the same source/destination is found, we'll - * return reference fish. - * In the case neither fish path nor BABL_FISH path are found, - * we'll try to construct new fish path for requested + * return reference fish. + * In the case neither fish path nor BABL_FISH path are found, + * we'll try to construct new fish path for requested * source/destination. In the case new fish path is found, we'll * return it, otherwise we'll create dummy BABL_FISH instance and * insert it into the fish database to indicate non-existent fish @@ -228,7 +228,7 @@ babl_fish (const void *source, { /* we have found suitable fish path in the database */ return ffish.fish_path; - } + } if (!ffish.fish_fish) { /* we haven't tried to search for suitable path yet */ @@ -238,7 +238,7 @@ babl_fish (const void *source, { return fish_path; } - else + else { /* there isn't a suitable path for requested formats, * let's create a dummy BABL_FISH instance and insert @@ -247,7 +247,7 @@ babl_fish (const void *source, */ char *name = "X"; /* name does not matter */ Babl *fish = babl_calloc (1, sizeof (BablFish) + strlen (name) + 1); - + fish->class_type = BABL_FISH; fish->instance.id = babl_fish_get_id (source_format, destination_format); fish->instance.name = ((char *) fish) + sizeof (BablFish); @@ -264,7 +264,7 @@ babl_fish (const void *source, /* we have already found suitable reference fish */ return ffish.fish_ref; } - else + else { /* we have to create new reference fish */ return babl_fish_reference (source_format, destination_format); diff --git a/babl/babl-format.c b/babl/babl-format.c index 09ccd1c..b4d65a0 100644 --- a/babl/babl-format.c +++ b/babl/babl-format.c @@ -56,9 +56,9 @@ format_new (const char *name, { component_found = 1; break; - } + } } - if (!component_found) + if (!component_found) { component_found = 0; babl_fatal ("matching source component for %s in model %s not found", @@ -297,18 +297,18 @@ babl_format_new (void *first_arg, va_end (varg); - if (!name) + if (!name) name = create_name (model, components, component, type); babl = babl_db_exist (db, id, name); - if (babl) + if (babl) { /* There is an instance already registered by the required id/name, * returning the preexistent one instead. */ return babl; } - + babl = format_new (name, id, planar, components, model, diff --git a/babl/babl-hash-table.c b/babl/babl-hash-table.c index b88faa2..c48d48d 100644 --- a/babl/babl-hash-table.c +++ b/babl/babl-hash-table.c @@ -16,7 +16,7 @@ * . */ -/* Implementation of hash table data structure based on coalesced hashing. +/* Implementation of hash table data structure based on coalesced hashing. * Copyright (C) 2008, Jan Heller */ @@ -25,20 +25,20 @@ #define BABL_HASH_TABLE_INITIAL_MASK 0x7F /* static functions declarations */ -static inline int +static inline int hash_insert (BablHashTable *htab, Babl *item); -static void +static void hash_rehash (BablHashTable *htab); -inline int +inline int babl_hash_by_str (BablHashTable *htab, const char *str) { int hash = 0; - + while (*str) { hash += *str++; @@ -52,13 +52,13 @@ babl_hash_by_str (BablHashTable *htab, return (hash & htab->mask); } -inline int -babl_hash_by_int (BablHashTable *htab, +inline int +babl_hash_by_int (BablHashTable *htab, int id) { int hash = 0; int i; - + for (i = 0; i < sizeof (int); i++) { hash += id & 0xFF; @@ -73,7 +73,7 @@ babl_hash_by_int (BablHashTable *htab, return (hash & htab->mask); } -static inline int +static inline int hash_insert (BablHashTable *htab, Babl *item) { @@ -84,31 +84,31 @@ hash_insert (BablHashTable *htab, /* create new chain */ htab->data_table[hash] = item; } - else + else { int it, oit, cursor = 0; while ((cursor < (htab->mask + 1)) && (htab->data_table[cursor] != NULL)) ++cursor; - + htab->data_table[cursor] = item; for (oit = hash, it = htab->chain_table[oit]; it != -1; oit = it, it = htab->chain_table[oit]) ; - htab->chain_table[oit] = cursor; + htab->chain_table[oit] = cursor; } htab->count++; return 0; } -static void +static void hash_rehash (BablHashTable *htab) { Babl *item; int i; BablHashTable *nhtab = babl_calloc (sizeof (BablHashTable), 1); - + nhtab->data_table = NULL; nhtab->chain_table = NULL; nhtab->mask = (htab->mask << 1) + 1; @@ -121,7 +121,7 @@ hash_rehash (BablHashTable *htab) nhtab->chain_table = babl_malloc (sizeof (int *) * babl_hash_table_size(nhtab)); memset (nhtab->chain_table, -1, sizeof (int) * babl_hash_table_size(nhtab)); } - + for (i = 0; i < babl_hash_table_size (htab); i++) { item = htab->data_table[i]; @@ -143,11 +143,11 @@ babl_hash_table_size (BablHashTable *htab) } BablHashTable * -babl_hash_table_init (BablHashValFunction hfunc, +babl_hash_table_init (BablHashValFunction hfunc, BablHashFindFunction ffunc) { BablHashTable *htab; - + babl_assert(hfunc); babl_assert(ffunc); @@ -166,7 +166,7 @@ babl_hash_table_init (BablHashValFunction hfunc, htab->chain_table = babl_malloc (sizeof (int *) * babl_hash_table_size(htab)); memset (htab->chain_table, -1, sizeof (int) * babl_hash_table_size(htab)); } - + return htab; } @@ -187,7 +187,7 @@ babl_hash_table_insert (BablHashTable *htab, babl_assert (htab); babl_assert (BABL_IS_BABL(item)); - if (babl_hash_table_size (htab) < htab->count + 1) + if (babl_hash_table_size (htab) < htab->count + 1) hash_rehash (htab); return hash_insert (htab, item); } @@ -207,7 +207,7 @@ babl_hash_table_find (BablHashTable *htab, if (!item) return NULL; - + for (;;) { if (htab->find_func (item, data)) @@ -217,7 +217,7 @@ babl_hash_table_find (BablHashTable *htab, break; item = htab->data_table[it]; } - + return NULL; } diff --git a/babl/babl-hash-table.h b/babl/babl-hash-table.h index 00cc395..e4163bd 100644 --- a/babl/babl-hash-table.h +++ b/babl/babl-hash-table.h @@ -41,15 +41,15 @@ typedef struct _BablHashTable BablHashTable * -babl_hash_table_init (BablHashValFunction hfunc, +babl_hash_table_init (BablHashValFunction hfunc, BablHashFindFunction ffunc); -inline int +inline int babl_hash_by_str (BablHashTable *htab, const char *str); -inline int -babl_hash_by_int (BablHashTable *htab, +inline int +babl_hash_by_int (BablHashTable *htab, int id); inline int diff --git a/babl/babl-image.c b/babl/babl-image.c index 22d7ae6..9d9b9d3 100644 --- a/babl/babl-image.c +++ b/babl/babl-image.c @@ -95,7 +95,7 @@ babl_image_from_linear (char *buffer, up subsequent use of linear buffers for subsequent accesses */ - { + { babl = format->format.image_template; format->format.image_template = NULL; for (i = 0; i < components; i++) diff --git a/babl/babl-internal.h b/babl/babl-internal.h index 1d0e281..ef523aa 100644 --- a/babl/babl-internal.h +++ b/babl/babl-internal.h @@ -129,7 +129,7 @@ real_babl_log (const char *file, { Babl *extender = babl_extender(); va_list varg; - + if (extender != babl_extension_quiet_log()) { @@ -261,7 +261,7 @@ BABL_DEFINE_INIT (type_name) \ BABL_DEFINE_DESTROY (type_name) \ BABL_DEFINE_LOOKUP_BY_NAME (type_name) \ BABL_DEFINE_EACH (type_name) \ -BABL_DEFINE_LOOKUP_BY_ID (type_name) +BABL_DEFINE_LOOKUP_BY_ID (type_name) #define BABL(obj) ((Babl*)(obj)) diff --git a/babl/babl-introspect.c b/babl/babl-introspect.c index d632ff8..9db8bb2 100644 --- a/babl/babl-introspect.c +++ b/babl/babl-introspect.c @@ -86,7 +86,7 @@ item_conversions_introspect (Babl *babl) BablList *list; list = babl->type.from_list; - if (list) + if (list) { babl_log ("\t\tconversions from %s: %i", babl->instance.name, babl_list_size (list)); diff --git a/babl/babl-list.c b/babl/babl-list.c index 1373bb9..8e539af 100644 --- a/babl/babl-list.c +++ b/babl/babl-list.c @@ -16,7 +16,7 @@ * . */ -/* Implementation of list data structure. +/* Implementation of list data structure. * Copyright (C) 2008, Jan Heller */ @@ -42,7 +42,7 @@ babl_list_init_with_size (int initial_size) list->size = initial_size; list->count = 0; list->items = NULL; - if (list->size) + if (list->size) { list->items = babl_calloc (sizeof (BablInstance *), list->size); } @@ -114,7 +114,7 @@ babl_list_get_last (BablList *list) return (list->items[list->count - 1]); } -inline void +inline void babl_list_copy (BablList *from, BablList *to) { @@ -144,7 +144,7 @@ babl_list_each (BablList *list, babl_assert(list); babl_assert(each_fun); - + for (i = 0; i < list->count; i++) { if (list->items[i]) diff --git a/babl/babl-list.h b/babl/babl-list.h index b543cde..139aee7 100644 --- a/babl/babl-list.h +++ b/babl/babl-list.h @@ -60,7 +60,7 @@ babl_list_get_first (BablList *list); inline Babl * babl_list_get_last (BablList *list); -inline void +inline void babl_list_copy (BablList *from, BablList *to); diff --git a/babl/babl-model.c b/babl/babl-model.c index 2d3fe08..db24723 100644 --- a/babl/babl-model.c +++ b/babl/babl-model.c @@ -165,7 +165,7 @@ babl_model_new (void *first_argument, name = create_name (name, components, component); babl = babl_db_exist (db, id, name); - if (babl) + if (babl) { /* There is an instance already registered by the required id/name, * returning the preexistent one instead. diff --git a/babl/babl-sanity.c b/babl/babl-sanity.c index e2beb64..7d5058f 100644 --- a/babl/babl-sanity.c +++ b/babl/babl-sanity.c @@ -114,7 +114,7 @@ int babl_sanity (void) { OK=1; - + babl_type_each (id_sanity, NULL); babl_component_each (id_sanity, NULL); babl_model_each (id_sanity, NULL); diff --git a/babl/babl-type.c b/babl/babl-type.c index b2ba824..d025ca3 100644 --- a/babl/babl-type.c +++ b/babl/babl-type.c @@ -130,7 +130,7 @@ babl_type_new (void *first_arg, va_end (varg); babl = babl_db_exist (db, id, first_arg); - if (babl) + if (babl) { /* There is an instance already registered by the required id/name, * returning the preexistent one instead. diff --git a/babl/babl.h b/babl/babl.h index 739c277..5c31627 100644 --- a/babl/babl.h +++ b/babl/babl.h @@ -77,7 +77,7 @@ Babl * babl_fish (const void *source_format, ...); /** Process n pixels from source to destination using babl_fish, - * returns number of pixels converted. + * returns number of pixels converted. */ long babl_process (Babl *babl_fish, void *source, @@ -92,7 +92,7 @@ long babl_process (Babl *babl_fish, * passed to babl_process, two different babl_process() functions will be * needed for this since the polymorphism cannot be trusted to work on linear * buffers. - * + * * Babl * babl_image (BablComponent *component1, * void *data, * int pitch, @@ -115,13 +115,13 @@ Babl * babl_image (void *first_component, * A data type that babl can have in it's buffers, requires * conversions to and from "double" to be registered before * passing sanity. - * + * * Babl * babl_type_new ( const char *name, * "bits", int bits, - * ["min_val", double min_val,] - * ["max_val", double max_val,] + * ["min_val", double min_val,] + * ["max_val", double max_val,] * NULL); - */ + */ /****************************************************************/ @@ -129,7 +129,7 @@ Babl * babl_image (void *first_component, /* * Babl * babl_component_new (const char *name, * NULL); - */ + */ /****************************************************************/ @@ -143,7 +143,7 @@ Babl * babl_image (void *first_component, * If no name is provided a name is generated by concatenating the * name of all the involved components. * - */ + */ /****************************************************************/ /* BablSampling */ BABL_CLASS_NO_NAME (sampling) @@ -169,7 +169,7 @@ Babl * babl_sampling (int horizontal, * Provided BablType and|or BablSampling is valid for the following * components as well. If no name is provided a (long) descriptive * name is used. - */ + */ /****************************************************************/ @@ -186,7 +186,7 @@ Babl * babl_sampling (int horizontal, * BablType *source, BablType *destination>, * <"linear"|"planar">, BablConversionFunc conv_func, * NULL); - */ + */ const char *babl_name (const Babl *babl); /* returns the name of a babl object */ diff --git a/babl/base/rgb-constants.h b/babl/base/rgb-constants.h index f163664..d8a428c 100644 --- a/babl/base/rgb-constants.h +++ b/babl/base/rgb-constants.h @@ -28,7 +28,7 @@ #define RGB_LUMA_RED (0.299) #define RGB_LUMA_GREEN (0.587) #define RGB_LUMA_BLUE (0.114) - #define RGB_LUMINANCE_RED RGB_LUMA_RED - #define RGB_LUMINANCE_GREEN RGB_LUMA_GREEN + #define RGB_LUMINANCE_RED RGB_LUMA_RED + #define RGB_LUMINANCE_GREEN RGB_LUMA_GREEN #define RGB_LUMINANCE_BLUE RGB_LUMA_BLUE #endif diff --git a/babl/base/util.h b/babl/base/util.h index 2e21b2c..fa2280c 100644 --- a/babl/base/util.h +++ b/babl/base/util.h @@ -32,7 +32,7 @@ assert(*dst); \ assert(n>0); \ assert(*src_pitch); \ - } + } #define BABL_PLANAR_STEP \ { \ diff --git a/extensions/util.h b/extensions/util.h index 596ef60..0a9e7c6 100644 --- a/extensions/util.h +++ b/extensions/util.h @@ -32,7 +32,7 @@ assert(*dst); \ assert(n>0); \ assert(*src_pitch); \ - } + } #define BABL_PLANAR_STEP \ { \ -- 2.30.2